home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Xconq 7.1.0 / src / xconq-7.1.0 / kernel / Makefile.in < prev    next >
Encoding:
Makefile  |  1996-07-07  |  4.7 KB  |  229 lines  |  [TEXT/R*ch]

  1. # Makefile for interface-independent code in Xconq.
  2. # Copyright (C) 1992, 1993, 1994, 1995 Stanley T. Shebs.
  3.  
  4. # Xconq is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. prefix = /usr/games
  10.  
  11. exec_prefix = $(prefix)
  12. bindir = $(exec_prefix)/bin
  13. libdir = $(exec_prefix)/lib
  14. datadir = $(prefix)/lib/xconq
  15. mandir = $(prefix)/man
  16. man6dir = $(mandir)/man6
  17. infodir = $(prefix)/info
  18. docdir = $(datadir)/doc
  19.  
  20. srcdir = .
  21. srcroot = $(srcdir)/..
  22.  
  23. SHELL = /bin/sh
  24.  
  25. INSTALL = install -c
  26. INSTALL_PROGRAM = $(INSTALL)
  27. INSTALL_DATA = $(INSTALL)
  28.  
  29. CC = cc
  30.  
  31. CFLAGS = -g
  32.  
  33. AR = ar
  34.  
  35. AR_FLAGS = rcu
  36.  
  37. RANLIB = ranlib
  38.  
  39. # Host and target-dependent makefile fragments come in here.
  40. ####
  41. # End of host and target-dependent makefile fragments.
  42.  
  43. LISP_H = lisp.h keyword.def
  44.  
  45. GAME_H = game.h utype.def mtype.def ttype.def gvar.def table.def
  46.  
  47. UNIT_H = unit.h action.def plan.def task.def goal.def
  48.  
  49. HISTORY_H = history.h history.def
  50.  
  51. ALL_H = conq.h config.h misc.h dir.h $(LISP_H) module.h $(GAME_H) \
  52.     player.h side.h $(UNIT_H) world.h $(HISTORY_H) score.h help.h \
  53.     ai.h system.h
  54.  
  55. # Non-interface-specific object files.
  56.  
  57. OBJS = \
  58.     init.o \
  59.     cmdline.o \
  60.     ai.o \
  61.     mplayer.o \
  62.     actions.o \
  63.     combat.o \
  64.     run.o \
  65.     score.o \
  66.     world.o \
  67.     history.o \
  68.     module.o \
  69.     write.o \
  70.     read.o \
  71.     mkterr.o \
  72.     mkunits.o \
  73.     mkrivers.o \
  74.     mkroads.o \
  75.     mknames.o \
  76.     side.o \
  77.     unit.o \
  78.     plan.o \
  79.     task.o \
  80.     nlang.o \
  81.     ui.o \
  82.     ps.o \
  83.     help.o \
  84.     copying.o
  85.  
  86. LOBJS = \
  87.     imf.o \
  88.     lisp.o \
  89.     util.o \
  90.     unix.o
  91.  
  92. # Object files needed by nonspecialized executables.
  93.  
  94. GOBJS =    generic.o \
  95.     types.o \
  96.     tables.o
  97.  
  98. # Random C compiler flags.
  99.  
  100. UNIX_CFLAGS = -DUNIX -DXCONQLIB=\"$(datadir)\"
  101.  
  102. ALL_CFLAGS = $(CFLAGS) $(UNIX_CFLAGS) -I$(srcdir)
  103.  
  104. .c.o:
  105.     $(CC) -c $(ALL_CFLAGS) $<
  106.  
  107. # Do it all.
  108. # (We used to build skelconq always, but between it and the .a files and
  109. # all the debugging info, a lot of space is chewed up; so if you want to
  110. # run tests or whatever, build it explicitly.)
  111.  
  112. all: libconq.a libconqlow.a
  113.  
  114. # The kernel library.  This is linked with interface code.
  115.  
  116. libconq.a: $(OBJS) $(GOBJS)
  117.     rm -f libconq.a
  118.     $(AR) $(AR_FLAGS) libconq.a $(OBJS) $(GOBJS) 
  119.     $(RANLIB) libconq.a
  120.  
  121. # The low-level kernel library.  This is linked with both complete games
  122. # and with GDL-using tools.
  123.  
  124. libconqlow.a: $(LOBJS)
  125.     rm -f libconqlow.a
  126.     $(AR) $(AR_FLAGS) libconqlow.a $(LOBJS)
  127.     $(RANLIB) libconqlow.a
  128.  
  129. # Specialized version (note that generic type/table code not linked in).
  130. #
  131. #conq-s.a: $(OBJS)
  132. #    rm -f conq-s.a
  133. #    ar ru conq-s.a $(OBJS)
  134. #    ranlib conq-s.a
  135.  
  136. # Test version of xconq.
  137.  
  138. skelconq: skelconq.o compile.o libconq.a libconqlow.a
  139.     rm -f skelconq
  140.     $(CC) -o skelconq $(ALL_CFLAGS) skelconq.o compile.o libconq.a libconqlow.a
  141.  
  142. imf2imf: imf2imf.o libconqlow.a
  143.     rm -f imf2imf
  144.     $(CC) -o imf2imf $(ALL_CFLAGS) imf2imf.o libconqlow.a
  145.  
  146. # Support things.
  147.  
  148. # (should do with a shell script, then can intercept failures)
  149. special.h: skelconq
  150.     skelconq <compile >special.h
  151.  
  152. skelconq.6:    skelconq.6in ../kernel/cmdline.6in
  153.     sed -e '/.so ...kernel.cmdline.6in/r $(srcdir)/../kernel/cmdline.6in' -e '/.so ...kernel.cmdline.6in/d' $(srcdir)/skelconq.6in >skelconq.6.new
  154.     $(srcdir)/../move-if-change skelconq.6.new skelconq.6
  155.  
  156. install: all install-only
  157.  
  158. # Note that skelconq is not really something that we want to install
  159. # anywhere.
  160.  
  161. install-only:
  162.  
  163. # Usual cleaning, and flushing of anything junk-like.
  164.  
  165. clean:
  166.     rm -f *.o lint.out core
  167.     rm -f *.a *conq *.log
  168.  
  169. distclean: clean
  170.     rm -f Makefile config.status
  171.  
  172. realclean: distclean
  173.  
  174. Makefile: Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  175.     $(SHELL) config.status
  176.  
  177. # All the .h dependencies.
  178.  
  179. init.o:        $(ALL_H) version.h
  180. cmdline.o:    $(ALL_H)
  181. mknames.o:    $(ALL_H)
  182. ai.o:        $(ALL_H)
  183. actions.o:    $(ALL_H)
  184. combat.o:    $(ALL_H)
  185. plan.o:        $(ALL_H)
  186. task.o:        $(ALL_H)
  187. run.o:        $(ALL_H)
  188. score.o:    $(ALL_H)
  189. world.o:    $(ALL_H)
  190. history.o:    $(ALL_H)
  191. module.o:    $(ALL_H)
  192. read.o:        $(ALL_H) keyword.def
  193. write.o:    $(ALL_H)
  194. side.o:        $(ALL_H)
  195. unit.o:        $(ALL_H)
  196. help.o:        $(ALL_H)
  197. copying.o:    $(ALL_H)
  198. nlang.o:    $(ALL_H)
  199. util.o:        $(ALL_H)
  200. mkunits.o:    $(ALL_H)
  201. mkterr.o:    $(ALL_H)
  202. mkrivers.o:    $(ALL_H)
  203. mkroads.o:    $(ALL_H)
  204. mplayer.o:    $(ALL_H)
  205.  
  206. generic.o:    config.h misc.h $(LISP_H) $(GAME_H)
  207. types.o:    config.h misc.h $(LISP_H) $(GAME_H)
  208. tables.o:    config.h misc.h $(LISP_H) $(GAME_H)
  209.  
  210. imf.o:        config.h misc.h $(LISP_H) imf.h
  211.  
  212. lisp.o:        config.h misc.h $(LISP_H)
  213.  
  214. unix.o:        config.h misc.h dir.h $(LISP_H) module.h system.h
  215.  
  216. ui.o:        $(ALL_H) ui.h imf.h
  217.  
  218. ps.o:        $(ALL_H) print.h
  219.  
  220. skelconq.o:    $(ALL_H) print.h
  221.  
  222. imf2imf.o:    config.h misc.h $(LISP_H) imf.h
  223.  
  224. # This *must* be compiled by a proper ANSI compiler.
  225.  
  226. compile.o:    $(ALL_H)
  227. #    gcc $(ALL_CFLAGS) -c compile.c
  228. #    $(CC) -c compile.c
  229.